import Layout from '../components/Layout.vue'

const routes = [
    {
        path: '/',
        component: Layout,
        meta: {
            title: '主页',
            icon: '',
            hidden: true
        },
        children: [
            {
                path: '',
                meta: { icon: '', title: '仪表盘' },
                component: () => import('../views/Home.vue')
            }
        ]
    },
    {
        path: '/setting',
        component: Layout,
        meta: { icon: 'setting', title: '系统设置' },
        children: [
            {
                path: 'user',
                meta: { icon: 'user', title: '用户管理' },
                component: () => import('../views/User.vue')
            },
            {
                path: 'role',
                meta: { icon: 'user', title: '角色管理' },
                component: () => import('../views/Role.vue')
            },
            {
                path: 'permission',
                meta: { icon: 'user', title: '权限管理' },
                component: () => import('../views/Permission.vue')
            },
            {
                path: 'dict',
                meta: { icon: 'user', title: '字典管理' },
                component: () => import('../views/Dict.vue')
            },
        ]
    },
    {
        path: '/login',
        meta: { icon: '', title: '登录', hidden: true },
        component: () => import('../views/Login.vue')
    }
]

export default routes